<template>
  <div>
    <Header></Header>
    <section>
      <Routers></Routers>
      <div id="section" class="main">
        <div class="common_header">
          <span class="common_header_tip">添加</span>
        </div>
        <div id="list">
          <ul id="list_top">
            <li>
              <span class="list_title">产品名称:</span>
              <input type="text" autocomplete="off">
            </li>
            <li>
              <span class="list_title">技术领域:</span>
              <input type="text">
            </li>
            <li>
              <span class="list_title">技术来源:</span>
              <input type="text" autocomplete="off">
            </li>
            <li>
              <span class="list_title">上年度销售额(元):</span>
              <input type="text" autocomplete="off">
            </li>
            <li>
              <span class="list_title">是否主要产品:</span>
              <!--<input type="text" autocomplete="off">-->
              <ul class="radioBOX">
                <li @click="toggle_isMain_radio">
                  <i class="inlineBlockIcon radio" :class="{active:isMain_radio}"></i>
                  <span>是</span>
                </li>
                <li @click="toggle_isMain_radio">
                  <i class="inlineBlockIcon radio" :class="{active:!isMain_radio}"></i>
                  <span>否</span>
                </li>
              </ul>
            </li>
            <li>
              <span class="list_title">知识产权编号:</span>
              <input type="text" autocomplete="off">
            </li>
          </ul>
          <ul id="list_bottom">
            <li>
              <span class="list_title">目的及组织实施方式:</span>
              <textarea></textarea>
            </li>
            <li>
              <span class="list_title">核心技术及创新点:</span>
              <textarea></textarea>
            </li>
            <li>
              <span class="list_title">取得的阶段性成果:</span>
              <textarea></textarea>
            </li>
          </ul>
          <div id="btnbox">
            <button class="add_tankuang_btn">保存</button>
            <button class="add_tankuang_btn">取消</button>
          </div>
        </div>
      </div>
    </section>
  </div>
</template>

<script>
  import Routers from '@/template/routers.vue'
  import Header from '@/template/common_header.vue'
  export default {
    name: 'rdManagement_add',
    components: {
      Routers,
      Header
    },
    data () {
      return {
        project_name:'',
        project_time:'',
        project_jishulingyu:'',
        project_jishulaiyuan:'',
        project_num:'',
        project_money:'',
        hiddenbox:false,
        isMain_radio:true
      }
    },
    mounted: function() {
      let id = this.$route.params.id
      if(id){
        console.log('you')
      }else{
        console.log('no')
      }
    },
    methods: {
      hiddenboxISshow () {
        this.hiddenbox = !this.hiddenbox
      },
      hiddenboxIShidden(){
        this.hiddenbox = !this.hiddenbox
      },
      toggle_isMain_radio(){
        this.isMain_radio = !this.isMain_radio
      }
    }
  }
</script>

<style scoped>
  @import '../../assets/public.css';
  @import '//at.alicdn.com/t/font_749860_je5eki3tevb.css';

  #list{
    width:800px;
  }
  #list_top{
    display: flex;

    align-items: center;
    flex-wrap: wrap;
    padding-top:34px;
    box-sizing: border-box;
  }
  #list_top>li{
    width:400px;
    /*flex:1;!**!*/
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    margin-bottom:27px;
  }
  #list_top>li>ul.radioBOX{
    width:220px;
    padding-left:10px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
  }
  #list_top>li>ul.radioBOX>li{
    margin-right:15px;
    cursor: pointer;
  }
  #list_top>li>ul.radioBOX i.radio{
    width:14px;
    height:14px;
    background-image: url("img/radio_false.png");
    margin-right:6px;
  }
  #list_top>li>ul.radioBOX i.radio.active{
    background-image: url("img/radio_true.png");
  }
  #list_top>li>input{
    width:220px;
    height:32px;
    border: 1px solid #ddd;
    box-sizing: border-box;
    padding-left:5px;
  }
  #list_top>li>select{
    width:220px;
    height:32px;
    border: 1px solid #ddd;
    box-sizing: border-box;
    padding-left:5px;
  }
  .list_title{
    color: #333;
    font-size:16px;
    padding-right:15px;
    display: inline-block;
    width:180px;
    text-align: right;
    box-sizing: border-box;
  }
  #list_bottom>li{
    display: flex;
    align-items: flex-start;
    box-sizing: border-box;
    justify-content: flex-end;
    margin-bottom:27px;
  }
  #list_bottom textarea{
    width:620px;
    height:146px;
    resize: none;
    box-sizing: border-box;
    border:1px solid #ddd;
    padding:10px;
    margin:0;
    outline: none;
  }
  #btnbox{
    padding-left:180px;
  }
  #btnbox>button:first-child{
    margin-right:32px;
  }
</style>
